import React, { Suspense } from "react";
import ReactDOM from "react-dom";
import App from "./components/App.js";
import * as http from "./service/todos";
import { HashRouter } from "react-router-dom";
import { Provider } from "react-redux";
import store from "./store";
// import "antd/dist/antd.min.css";
import "./styles/reset.css";

React.Component.prototype.$http = http;

ReactDOM.render(
  <Provider store={store}>
    <Suspense fallback={<div>loading...</div>}>
      <HashRouter>
        <App />
      </HashRouter>
    </Suspense>
  </Provider>,
  document.getElementById("root")
);
